﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using YunBox2.Contracts.FoundationModels;
using FluentNHibernate.Mapping;
namespace YunBox2.DAL.Maps
{
    public class CartonMap:SubclassMap<Carton>
    {
        public CartonMap()
        {
            References(x => x.CartonType).Column("CortonTypeId").Not.Nullable().ForeignKey("FK_Carton__CartonType");
            References(x => x.BoardMaterial).Column("BoardmaterialId").Not.Nullable().ForeignKey("FK_Carton__BoardMaterial");
            Map(x => x.Height).Not.Nullable();
            Map(x => x.Width).Not.Nullable();
            Map(x => x.Length).Not.Nullable();
            KeyColumn("CartonId");
            Table("Carton");
        }
    }
}
